<%@page import="cn.yi.medicalsys.pojo.Office"%>
<%@page import="cn.yi.medicalsys.service.OfficeService"%>
<%@page import="cn.yi.medicalsys.service.impl.OfficeServiceImpl"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
	+ request.getServerName() + ":" + request.getServerPort()
	+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/layout.css" rel="stylesheet" type="text/css" />

<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" />
<!-- Font Awesome -->
<link href="css/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<!-- NProgress -->
<link href="css/nprogress/nprogress.css" rel="stylesheet" />
<!-- Custom Theme Style -->
<link href="css/custom.min.css" rel="stylesheet" />
<style type="text/css">
.dep1 {
	margin: 0px 60px;
	padding: 3px 0px;
	position: absolute;
	top: 95px;
	left: 260px;
	width: 100;
	height: 100px;
}

.dep1 input {
	height: 30px;
}

.search-btn {
	position: absolute;
	left: 760px;
}
.paginate_button {
	float: right;
	position: relative;
	right: 500px;
	margin: 5px 20px;
}

.black_overlay {
	display: none;
	position: absolute;
	top: 0%;
	left: 0%;
	width: 100%;
	height: 100%;
	background-color: black;
	z-index: 1001;
	-moz-opacity: 0.8;
	opacity: .80;
	filter: alpha(opacity = 88);
}

.white_content {
	display: none;
	position: absolute;
	top: 0%;
	left: 25%;
	width: 35%;
	height: 80%;
	padding: 20px;
	border: 10px solid orange;
	background-color: white;
	z-index: 1002;
	overflow: auto;
}

#close {
	position: relative;
	right: -350px;
	top: 400px;
}
</style>
</head>
<body>
	<!--背景-->
	<div class="background">
		<img src="images/bg1.jpg" alt="" />
		<div class="logo"></div>
	</div>
	<!--主内容开始-->
	<div id="container">
		<div id="head">
			<a href="#" class="arrange" id="arrange"></a>
			<div class="yij">
				<a href="#">医院业务人员管理</a>
			</div>
			<div class="h-right">
				<a href="#" class="home"></a> <img src="images/line.png" width="2"
					height="50" alt="" /> <a href="#" class="cloud" id="cloud">
					<div class="same">云同步</div>
				</a> <img src="images/line.png" width="2" height="50" alt="" /> <a
					href="#" class="bell"><span class="tip">3</span></a> <img
					src="images/line.png" width="2" height="50" alt="" />
				<div class="user">
					<div class="pho">
						<img src="images/photo.jpg" width="52" height="50" alt="" />
					</div>
					<span id="name">张末末
						<div class="user-info" id="twodm">
							<div class="jtt"></div>
							<div class="menu">
								<div class="first">
									<a href="#">个人信息</a>
								</div>
								<div class="second">
									<a href="#">通知<em>3</em></a>
								</div>
								<a href="#" class="quit">退出</a>
							</div>
						</div>
					</span>

				</div>
				<img src="images/line.png" width="2" height="50" alt="" /> <a
					href="#" class="notice" id="notice"></a>
			</div>
		</div>
		<!--侧边栏-右-->
		<div class="side-bar" id="side-bar">
			<div class="side-bar-in">
				<ul class="tab">
					<li class="title vtitle"><a href="#" class="lianxi"></a></li>
					<li class="title"><a href="#" class="heart"></a></li>
					<li class="title"><a href="#" class="setting"></a></li>
					<div class="vcon" id="vcon" style="display:block;">
						<ul>
							<li>
								<div class="pic">
									<img src="images/doctor2.png" alt=""><span class="tis">10</span>
								</div> <span>
									<h4>张美芳</h4>
									<p>厦门市第一医院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
							<li class="xuanz">
								<div class="pic">
									<img src="images/doctor5.png" alt=""><span class="tis">10</span>
								</div> <span>
									<h4>刘志泽</h4>
									<p>厦门市第二医院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
							<li>
								<div class="pic">
									<img src="images/doctor3.png" alt=""><span class="tis">10</span>
								</div> <span>
									<h4>赵美美</h4>
									<p>厦门市中山医院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
							<li>
								<div class="pic">
									<img src="images/doctor6.png" alt="">
								</div> <span>
									<h4>王泽军</h4>
									<p>海沧医院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
							<li>
								<div class="pic">
									<img src="images/doctor4.png" alt=""><span class="tis">10</span>
								</div> <span>
									<h4>白丽兰</h4>
									<p>海军总医院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
							<li>
								<div class="pic">
									<img src="images/doctor7.png" alt=""><span class="tis">10</span>
								</div> <span>
									<h4>何平安</h4>
									<p>福建医科大学附属医院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
							<li>
								<div class="pic">
									<img src="images/doctor2.png" alt=""><span class="tis">10</span>
								</div> <span>
									<h4>刘晶晶</h4>
									<p>武警医院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
							<li>
								<div class="pic">
									<img src="images/doctor5.png" alt=""><span class="tis">10</span>
								</div> <span>
									<h4>唐逸汸</h4>
									<p>福建省立医院院</p>
							</span> <a href="#" class="v-big"></a>
							</li>
						</ul>
					</div>
					<div class="vcon">2</div>
					<div class="vcon">
						<div class="block">
							<span>背景颜色选择</span> <a href="#" class="dot" id="blue"><img
								src="images/blue_dot.png" width="14" height="14" alt="" /></a> <a
								href="#" class="dot" id="pink"><img
								src="images/pink_dot.png" width="14" height="14" alt="" /></a> <a
								href="#" class="dot" id="green"><img
								src="images/green_dot.png" width="14" height="14" alt="" /></a>
						</div>
						<div class="block">
							<span>显示不在线医生</span> <a href="#" class="off" id="off"></a>
						</div>
						<div class="block">
							<span>消息提示</span> <a href="#" class="open" id="open"></a>
						</div>
					</div>
				</ul>
			</div>
		</div>
		<!--左侧栏begin-->
		<!--  <div class="left-bar" id="left-bar">
    <ul>
      <li><a href="#" class="synergy">医技协同<em>医技协同</em></a></li>
      <li><a href="#" class="movie">影像诊断<em>影像诊断</em></a></li>
      <li><a href="#" class="computer">预约协同<em>预约协同</em></a></li>
      <li><a href="#" class="drug">预交金管理<em>预交金管理</em></a></li>
      <li><a href="#" class="results">个人绩效<em>个人绩效</em></a></li>
    </ul>
  </div> -->
		<!--左侧栏end-->
		<!--模块-->
		<div class="apply" id="">
			<div class="app-top">
				<div class="appmenu">
					<span class="depart">医院名称：郑州博爱医院</span>
				</div>
				<form method="post" action="searchdoctor">
					<input type="hidden" id="pageNo" name="pageNo" value="1" />
					<div class="appmenu">
						<labels>医生姓名：</labels>
						<div class="dep1">
							<p>
								<input type="text" name="depname" id="depname"
									value="${depname }" />
							</p>
						</div>
					</div>
					<div class="appmenu">
						<label>科室：</label>
						<div class="dep">
							<select id="office" name="office"
								class="form-control col-md-7 col-xs-12">
								<option value="0">--请选择科室--</option>
								<c:forEach items="${listoffice }" var="officelist"
									varStatus="index">
									<option value="${officelist.officeName }">--${officelist.officeName }--</option>
								</c:forEach>
							</select>
						</div>
					</div>
					<div class="appmenu">
						<button type="submit" class="search-btn">
							<img src="images/search.png" width="17" height="18" alt="" />
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查
							&nbsp;&nbsp;&nbsp;&nbsp;询
						</button>
					</div>
				</form>
			</div>

			<div class="app-con">
				<div class="qietab">
					<div class="qiehuan qiegreen">医务人员</div>
					<a href="adddoctor.jsp"><p class="qiehuan qiegreen">添加医务人员</p></a>
					<div class="qiehuan1"></div>
				</div>
				<!--表格-->
				<div class="app-grid">
					<div class="t-head">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td class="riqi">医生编号</td>
								<td class="riqi">医师姓名</td>
								<td class="riqi">医生性别</td>
								<td class="riqi">医生年龄</td>
								<td class="riqi">归属科室</td>
								<td class="riqi">职称</td>
								<td class="riqi">联系方式</td>
								<td class="riqi">邮箱地址</td>
								<td>操作</td>
							</tr>
						</table>
					</div>
					<div class="t-con">
						<div class="t-con1">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<%
									int i=-1;
								%>
								<c:forEach items="${bean.list }" var="doctor" varStatus="index">
									<%
										i++;
									%>
									<tr class="biao">
										<td class="riqi">${doctor.dId }</td>
										<td class="riqi">${doctor.doctName }</td>
										<td class="riqi">${doctor.doctSex }</td>
										<td class="riqi">${doctor.doctAge }</td>
										<%
											List<String> list=(List<String>)session.getAttribute("listOff");
										%>
										<td id="oo" class="riqi"><%=list.get(i) %></td>
										<td class="riqi">${doctor.appellation }</td>
										<td class="riqi">${doctor.doctPhone }</td>
										<td class="riqi">${doctor.doctEmail }</td>
										<td>
											<div class="btn-group">
												<button type="button" class="btn btn-danger">点击操作</button>
												<button type="button" class="btn btn-danger dropdown-toggle"
													data-toggle="dropdown" aria-expanded="false">
													<span class="caret"></span>
												</button>												
												<ul class="dropdown-menu" role="menu">
													<li><a href="#?id=${doctor.dId }"
														class="layui-btn layui-btn-xs"
														onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">
															点击修改</a>	
													</li>
													<li><a class="deleteApp"
														onclick="return delNews(${doctor.dId })"
														data-toggle="tooltip" data-placement="top" title=""
														data-original-title="删除新闻的基本信息">点击删除</a></li>
												</ul>
											</div>
										</td>
									</tr>
								</c:forEach>

							</table>
						</div>
						<div id="light" class="white_content">
						<a href="javascript:void(0)"
						onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">
						<button class="layui-btn layui-btn-xs" id="close">請点击关闭</button></a> 																			
			</br></br>
			<form class="biaodan" action="doctor?action=modify" method="post">
						<li>医生编号： <input id="docdid" name="docdid" value="" /><input type="button" value="必填项" /></li></br>
						<li>医生年龄： <input id="docage" name="docage" value="" /></li></br>
						<li>医生职称： <input id="docappellation" name="docappellation" value="" /></li></br>
						<li>医生手机号 <input id="docPhone" name="docPhone" value="" /></li></br>
						<li>医生邮箱： <input id="docEmail" name="docEmail" value="" /></li></br>												
						<li>医生科室： <select id="docoffice" name="docoffice"><option></option>
						<%
							List<Office> list=(List<Office>)session.getAttribute("listoffice");
							for(int k=0;k<list.size();k++){															
						%>
						<option id="docoffice" name="docoffice"><%=list.get(k).getOfficeName()+"-"+list.get(k).getoId() %></option>
						<%
							}
						%>
						<select/></li></br>						
						<input type="submit" />
			</form>	
		</div>	
		<div id="fade" class="black_overlay"></div>						
					</div>								
					</div>
					<!--页码-->
					<div class="page">
						<div class="pagein">
							<a
								href="searchdoctor?pageNo=${bean.totalPageCount }&depname=${depname }&office=${office }"
								class="lastpage"></a> <a
								href="searchdoctor?pageNo=${bean.currPageNo+1 }&depname=${depname }&office=${office }"
								class="nextpage"></a> <span>第<em>${bean.currPageNo }</em>页，共<em>${bean.totalPageCount }</em>页
							</span> <a
								href="searchdoctor?pageNo=${bean.currPageNo-1 }&depname=${depname }&office=${office }"
								class="prevpage"></a> <a
								href="searchdoctor?pageNo=1&depname=${depname }&office=${office }"
								class="firstpage"></a>
						</div>
					</div>
				</div>
			</div>

		</div>
	</div>
	<!--主内容结束-->
	<script src="js/jquery-1.12.4.js"></script>
</body>
<script src="js/jquery-1.7.1.min.js" language="javascript"
	type="text/javascript"></script>
<script src="js/jquery.mousewheel.js" type="text/javascript"></script>
<script src="js/jquery.jscrollpane.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.event.drag-1.5.min.js"></script>
<script type="text/javascript" src="js/jquery.touchSlider.js"></script>
<script type="text/javascript" src="js/jquery.nicescroll.js"></script>
<script src="js/slide.js" language="javascript" type="text/javascript"></script>
<!--[if IE 6]> <script src="../js/EvPng.js" type="text/javascript"></script> 
<script language="javascript" type="text/javascript"> 
EvPNG.fix("*");
</script> 
<![endif]-->
<!-- jQuery -->
<script src="js/jquery-1.12.4.js"></script>
<!-- Bootstrap -->
<script src="js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="js/fastclick.js"></script>
<!-- NProgress -->
<script src="css/nprogress/nprogress.js"></script>

<!-- Custom Theme Scripts -->
<script src="js/custom.min.js"></script>
<script type="text/javascript">
	  function delNews(nid){
		   var flag=window.confirm("ni确认要删除吗？");
		   if(flag){
			   //进行删除
			   window.location.href="doctor?action=del&nid="+nid;
			   return true;
		   }
		   return false;
	   }
	   //
	   function page_nav(num){
	    var frm=document.forms[0];//本页第一个表单
		frm.pageNo.value = num;
		frm.submit();
		}
	   function jump_to(num){
	   var regexp=/^[1-9]\d*$/;
	   var totalPageCount = document.getElementById("totalPageCount").value;
	   if(!regexp.test(num)){
		alert("请输入大于0的正整数！");
		return false;
		}else if((num-totalPageCount) > 0){
		alert("请输入小于总页数的页码");
		return false;
		}
		else{
		  page_nav(num);
	    }
       }
	</script>
</html>

